package org.agile2soft.nexoma.core.tapestry.pages.user;

import org.agile2soft.nexoma.core.entity.User;
import org.apache.tapestry5.annotations.Mixin;
import org.apache.tapestry5.beaneditor.BeanModel;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.BeanModelSource;

import br.com.arsmachina.tapestrycrud.base.BaseEditPage;
import br.com.arsmachina.tapestrycrud.hibernatevalidator.mixins.HibernateValidatorMixin;

public class EditUser extends BaseEditPage<User,Integer> {

    @Mixin
    @SuppressWarnings("unused")
    private HibernateValidatorMixin hibernateValidatorMixin;


    @Inject
    private BeanModelSource beanModelSource;

    @Inject
    private Messages messages;

    @Override
    public BeanModel<User> getBeanModel() {
        BeanModel<User>beanModel = beanModelSource.createEditModel(User.class, messages);
        return beanModel;
    }

}
